package com.jyhg.core.mobile.utils
{
	import starling.filters.ColorMatrixFilter;
	
	/**
	 * @author Jonny.Hong
	 */
	public class BtnEnable
	{
		public function BtnEnable()
		{
		}
		
		/**
		 *按钮不能点击 
		 * @param btn
		 * 
		 */
		public static function disEnable(btn:*):void
		{
			btn.touchable = false;
			const filter:ColorMatrixFilter = new ColorMatrixFilter();
			filter.adjustSaturation(-1);
			btn.filter = filter;
		}
		
		public static function enable(btn:*):void
		{
			btn.touchable = true;
			btn.filter = null;
		}
	}
}